namespace Weather;
public static class Utils
{
    public static List<string> GetArgsList(string[] args)
    {
        List<string> argsList = new List<string>();
        for (int i = 0; i < args.Length; i++)
        {
            argsList.Add(args[i]);
        }
        return argsList;
    }

    public static void WriteLine(string text, ConsoleColor? foreColor = null, ConsoleColor? backColor = null)
    {
        if (backColor.HasValue)
            Console.BackgroundColor = backColor.Value;
        if (foreColor.HasValue)
            Console.ForegroundColor = foreColor.Value;
        Console.WriteLine(text);
        Console.ResetColor();
    }

    public static void Write(string text, ConsoleColor? foreColor = null, ConsoleColor? backColor = null)
    {
        if (backColor.HasValue)
            Console.BackgroundColor = backColor.Value;
        if (foreColor.HasValue)
            Console.ForegroundColor = foreColor.Value;
        Console.Write(text);
        Console.ResetColor();
    }
}